package com.dsteiner.xelavos.client.rpc;

import java.util.List;

import com.dsteiner.widgets.client.domain.DataRequest;
import com.dsteiner.widgets.client.domain.Distinct;
import com.dsteiner.widgets.client.rpc.BaseDataServiceAsync;
import com.dsteiner.widgets.client.rpc.CrudResult;
import com.dsteiner.widgets.client.rpc.SearchRequest;
import com.dsteiner.xelavos.client.domain.DataResult;
import com.dsteiner.xelavos.client.domain.SearchInfo;
import com.dsteiner.xelavos.client.domain.User;
import com.dsteiner.xelavos.client.domain.UserStats;
import com.google.gwt.http.client.Request;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface DataServiceAsync extends BaseDataServiceAsync{

	Request getUser(String email, String password, AsyncCallback<CrudResult<User>> asyncCallback);

	Request getData(List<DataRequest> dataRequests, AsyncCallback<DataResult> asyncCallback);
	
	Request getUserStats(AsyncCallback<UserStats> asyncCallback);

	void clearCache(AsyncCallback<Void> callback);

	void sendPassword(String email, AsyncCallback<String> asyncCallback);

	void sendConfirmationMail(User user, AsyncCallback<Void> callback);

	void getSearchInfo(SearchRequest searchRequest, AsyncCallback<SearchInfo> asyncCallback);

	void sendMessage(String fromUserId, String toUserId, String message, AsyncCallback<String> callback);

	void updatePassword(User user, String password, AsyncCallback<CrudResult<User>> asyncCallback);

}
